#ifndef MYLABEL_H
#define MYLABEL_H

#include <QLabel>
#include "snake.h"

class mylabel : public QLabel
{
    Q_OBJECT
public:
    mylabel(QWidget * parent = nullptr);

public:
    virtual void mouseDoubleClickEvent(QMouseEvent *event);//双击重写
    virtual void mousePressEvent(QMouseEvent *event);//单击重写

signals:
    void doubleClicked(QWidget * widget);  // 定义信号，通知其他类双击事件
};

#endif // MYLABEL_H
